﻿﻿@model WebApp.Models.Department
<!-- 弹出窗体form表单 -->
 <div id="detailswindow" hidden="hidden" class="easyui-window" 
      title="明细数据" 
      data-options="modal:true,
                    closed:true,
                    iconCls:'icon-save',
                    footer:'#windowfooter',
                    closeDuration:200,
                    closeAnimation:'slide',
                    openDuration:300,
                    openAnimation:'slide',
                    onOpen:function(){
                       $(this).window('vcenter');
                    },
                    onRestore:function(){
                    },
                    onMaximize:function(){
                    }
                    " style="width:1440px;height:520px">
    <!-- begin toolbar -->
    <div class="window-body-toolbar">
        <div class="row">
            <div class="col-sm-8">
                <div class="btn-group btn-group-sm">
                       <button onclick="saveitem()" class="btn btn-default"> 
                          <i class="fa fa-floppy-o"></i> 保存 
                       </button>
                </div>
                <div class="btn-group btn-group-sm">
                       <button onclick="printitem()" class="btn btn-default">
                         <i class="fa fa-print"></i> 打印 
                       </button>
                </div>
            </div>
            <div class="col-sm-4 text-align-right">
              <div class="btn-group btn-group-sm">
                <button type="button" class="btn   btn-success" onclick="closewindow()">
                    <i class="fa fa-chevron-left"></i>
                    关闭
                </button>
              </div>
            </div>
        </div>
    </div>
    <!-- end toolbar -->
    <!-- begin window body -->
    <div class="padding-10">
    <!-- begin form表单界面-->
        <div class="row">
            <div class="col-md-12">
           <form id="department_form" class="easyui-form form-horizontal" method="post" data-options="novalidate:true">
  @Html.AntiForgeryToken()
   <input type="hidden" id="@Html.IdFor(model => model.Id)" 
                       name="@Html.NameFor(model => model.Id)" 
                       value="@Html.ValueFor(model => model.Id)" />
  <table class="table table-bordered">
   
	    <tr>
	   <td class="control-label"><span class="required">@Html.DisplayNameFor(model => model.Name)</span></td>
	   <td> 
			<input id="@Html.IdFor(model => model.Name)" 
				   name="@Html.NameFor(model => model.Name)" 
				   value="@Html.ValueFor(model => model.Name)"
				   tabindex="0" required
				   class="easyui-textbox" 
				   type="text" 
				   data-options="prompt:'@Html.DisplayNameFor(model => model.Name)',
								 label:'',
                                 width:200,
								 required:true ,validType:'length[0,50]'" />
				   </td>
	   	   <td class="control-label">@Html.DisplayNameFor(model => model.Manager)</td>
	   <td> 
			<input id="@Html.IdFor(model => model.Manager)" 
				   name="@Html.NameFor(model => model.Manager)" 
				   value="@Html.ValueFor(model => model.Manager)"
				   tabindex="1" 
				   class="easyui-textbox" 
				   type="text" 
				   data-options="prompt:'@Html.DisplayNameFor(model => model.Manager)',
								 label:'',
                                 width:200,
								 required:false ,validType:'length[0,20]'" />
				   </td>
	   	   <td class="control-label"><span class="required">@Html.DisplayNameFor(model => model.CompanyId)</span></td>
	   <td> 
			<input id="@Html.IdFor(model => model.CompanyId)"
			       name="@Html.NameFor(model => model.CompanyId)"
				   value="@Html.ValueFor(model => model.CompanyId)"
                   tabindex="2" required
              	   class="easyui-combobox"       
                   data-options="prompt:'@Html.DisplayNameFor(model => model.CompanyId)' ,
						label:'' ,
                        width:200,
						required:true ,
						valueField: 'Id',
						textField:  'Name' ,
						url: '/Departments/GetCompaniesAsync' ,
						onSelect: function(item){
						//console.log(item);
				}">
	   </td>
	   	    		<td></td> <td></td>
		     </tr>
	       </table>
     </form>
     </div>
    </div>
<!--end form表单界面-->
<!--========================================================================================-->
     </div>
    <!--end window body -->
</div>
<div id="windowfooter" style="padding:5px;">&nbsp;</div>
<!-- 弹出窗体form表单 -->




